<?php
/**
 * 记录错误信息到数据库
 * @author Administrator
 *
 */
class CLogDB extends CBase implements ILog {
	
	public function write($content,$dir=null,$fileName=null)
	{
		try
		{
			$errorModel = new errorModel();
			
			$content = str_replace(PHP_EOL,"<br />",$content);
			$modelInfo["error_msg"] = $content;
			$modelInfo["create_time"] = $errorModel->getSysDate();
			$errorModel->insert($modelInfo);
		}
		catch(Exception $e)
		{
			echo $e->getMessage();
			exit;
		}
	}
}

?>